package com.example.sanchuang_demo.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.sanchuang_demo.domain.Membership;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import java.lang.reflect.Member;
import java.util.List;

@Mapper
@Repository
public interface MembershipMapper extends BaseMapper<Membership> {

    @Select("SELECT membership.*, school.school_name,region.region_name\n" +
            "FROM membership\n" +
            "INNER JOIN school ON membership.school_id = school.id\n" +
            "INNER JOIN region ON membership.region_id = region.id\n" +
            "ORDER BY membership.sequential" )
    List<Membership> getMembership();


}
